package com.louis.util;

import com.louis.enumeration.Pattern;

import org.joda.time.DateTime;
import org.joda.time.LocalDate;
import org.joda.time.LocalTime;


/**
 * @author Lijun jiang
 * @Date: May 10, 2011
 * @Time: 3:17:06 PM
 */

public abstract class JodaUtil {

    public static DateTime now() {
        return new DateTime();
    }

    public static String toString(DateTime dateTime, Pattern pattern) {
        return dateTime.toString(pattern.getValue());
    }

    public static String toString(LocalDate localDate, Pattern pattern) {
        return localDate.toString(pattern.getValue());
    }

    public static String toString(LocalTime localTime, Pattern pattern) {
        return localTime.toString(pattern.getValue());
    }
}